1 -- phpMyAdmin SQL Dump
2 -- version
2.11.6
3 -- http:
//www.phpmyadmin.net
4 --
5 -- Host: localhost
6 -- Generation Time: May
11, 2010 at 06:19 AM
7 -- Server version:
5.0.51
8 -- PHP Version:
5.2.6
9
10 SET SQL_MODE=
"NO_AUTO_VALUE_ON_ZERO";
11
12
13 /*!
40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
14 /*!
40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
15 /*!
40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
16 /*!
40101 SET NAMES utf8 */;
17
18 --
19 -- Database: `stock`
20 --
21
22 -- --------------------------------------------------------
23
24 --
25 -- Table structure
for table `category_details`
26 --
27
28 CREATE TABLE `category_details` (
29   `id`
int(10) unsigned NOT NULL auto_increment,
30   `category_name` varchar(
120) NOT NULL,
31   `category_description` varchar(
250) NOT NULL,
32   PRIMARY KEY (`id`)
33 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=
18 ;
34
35 --
36 -- Dumping data
for table `category_details`
37 --
38
39 INSERT INTO `category_details` (`id`, `category_name`, `category_description`) VALUES
40 (
5, 'category1', ''),
41 (
6, 'category2', ''),
42 (
7, 'category3', ''),
43 (
8, 'category4', ''),
44 (
9, 'category6', ''),
45 (
10, 'category7', ''),
46 (
11, 'category8', ''),
47 (
12, 'category9', ''),
48 (
13, 'category10', ''),
49 (
14, 'category11', ''),
50 (
15, 'category18', ''),
51 (
16, '', ''),
52 (
17, 'newcategory', '');
53
54 -- --------------------------------------------------------
55
56 --
57 -- Table structure
for table `customer_details`
58 --
59
60 CREATE TABLE `customer_details` (
61   `id`
int(10) unsigned NOT NULL auto_increment,
62   `customer_name` varchar(
200) NOT NULL,
63   `customer_address` varchar(
500) NOT NULL,
64   `customer_contact1` varchar(
100) NOT NULL,
65   `customer_contact2` varchar(
100) NOT NULL,
66   `balance`
int(11) NOT NULL,
67   PRIMARY KEY (`id`)
68 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=
3 ;
69
70 --
71 -- Dumping data
for table `customer_details`
72 --
73
74 INSERT INTO `customer_details` (`id`, `customer_name`, `customer_address`, `customer_contact1`, `customer_contact2`, `balance`) VALUES
75 (
1, 'Customer1', 'address1', '8523544', '75254552', -7788),
76 (
2, 'customer2', 'customer 2 address', '86789789', '9879889789', 4872);
77
78 -- --------------------------------------------------------
79
80 --
81 -- Table structure
for table `stock_avail`
82 --
83
84 CREATE TABLE `stock_avail` (
85   `id`
int(10) unsigned NOT NULL auto_increment,
86   `name` varchar(
120) NOT NULL,
87   `quantity`
int(10) unsigned NOT NULL,
88   PRIMARY KEY (`id`)
89 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=
6 ;
90
91 --
92 -- Dumping data
for table `stock_avail`
93 --
94
95 INSERT INTO `stock_avail` (`id`, `name`, `quantity`) VALUES
96 (
1, 'truzo super', 0),
97 (
2, 'alanto', 0),
98 (
3, 'Swipe 60 GM', 14156),
99 (
4, 'Swipe 120 GM', 100),
100 (
5, 'newstock', 1331);
101
102 -- --------------------------------------------------------
103
104 --
105 -- Table structure
for table `stock_details`
106 --
107
108 CREATE TABLE `stock_details` (
109   `id`
int(10) unsigned NOT NULL auto_increment,
110   `stock_id` varchar(
120) NOT NULL,
111   `stock_name` varchar(
120) NOT NULL,
112   `stock_quatity`
int(11) NOT NULL,
113   `supplier_id` varchar(
250) NOT NULL,
114   `company_price`
decimal(10,2) NOT NULL,
115   `selling_price`
decimal(10,2) NOT NULL,
116   `category` varchar(
120) NOT NULL,
117   `date` timestamp NOT NULL
default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
118   `expire_date` datetime NOT NULL,
119   `uom` varchar(
120) NOT NULL,
120   PRIMARY KEY (`id`)
121 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=
3 ;
122
123 --
124 -- Dumping data
for table `stock_details`
125 --
126
127 INSERT INTO `stock_details` (`id`, `stock_id`, `stock_name`, `stock_quatity`, `supplier_id`, `company_price`, `selling_price`, `category`, `date`, `expire_date`, `uom`) VALUES
128 (
1, 'SD1', 'Swipe 60 GM', 0, 'Biotic life science', '77.00', '80.00', '', '2010-04-22 16:31:10', '0000-00-00 00:00:00', ''),
129 (
2, 'SD2', 'newstock', 0, 'Biotic life science', '452.00', '452.00', 'category1', '2010-05-11 10:37:41', '0000-00-00 00:00:00', '');
130
131 -- --------------------------------------------------------
132
133 --
134 -- Table structure
for table `stock_entries`
135 --
136
137 CREATE TABLE `stock_entries` (
138   `id`
int(10) unsigned NOT NULL auto_increment,
139   `stock_id` varchar(
120) NOT NULL,
140   `stock_name` varchar(
260) NOT NULL,
141   `stock_supplier_name` varchar(
200) NOT NULL,
142   `category` varchar(
120) NOT NULL,
143   `quantity`
int(11) NOT NULL,
144   `company_price`
decimal(10,2) NOT NULL,
145   `selling_price`
decimal(10,2) NOT NULL,
146   `opening_stock`
int(11) NOT NULL,
147   `closing_stock`
int(11) NOT NULL,
148   `date` datetime NOT NULL,
149   `username` varchar(
120) NOT NULL,
150   `type` varchar(
50) NOT NULL,
151   `salesid` varchar(
120) NOT NULL,
152   `total`
decimal(10,2) NOT NULL,
153   `payment`
decimal(10,2) NOT NULL,
154   `balance`
decimal(10,2) NOT NULL,
155   `mode` varchar(
150) NOT NULL,
156   `description` varchar(
500) NOT NULL,
157   `due` datetime NOT NULL,
158   `subtotal`
int(11) NOT NULL,
159   `count1`
int(11) NOT NULL,
160   `billnumber` varchar(
120) NOT NULL,
161   PRIMARY KEY (`id`)
162 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=
201 ;
163
164 --
165 -- Dumping data
for table `stock_entries`
166 --
167
168 INSERT INTO `stock_entries` (`id`, `stock_id`, `stock_name`, `stock_supplier_name`, `category`, `quantity`, `company_price`, `selling_price`, `opening_stock`, `closing_stock`, `date`, `username`, `type`, `salesid`, `total`, `payment`, `balance`, `mode`, `description`, `due`, `subtotal`, `count1`, `billnumber`) VALUES
169 (
197, 'SE1', 'Swipe 60 GM', 'Biotic life science', '', 14, '77.00', '80.00', 14189, 14203, '2010-05-11 00:00:00', 'admin', 'entry', '', '1078.00', '39498.00', '0.00', 'cash', 'sdfds', '2010-05-11 00:00:00', 39498, 1, '14452'),
170 (
198, 'SE1', 'newstock', 'Biotic life science', '', 85, '452.00', '452.00', 1280, 1365, '2010-05-11 00:00:00', 'admin', 'entry', '', '38420.00', '39498.00', '0.00', 'cash', 'sdfds', '2010-05-11 00:00:00', 39498, 2, '14452'),
171 (
199, 'SA5', 'newstock', '', '', 34, '0.00', '452.00', 1365, 1331, '2010-05-11 00:00:00', 'admin', 'sales', 'SA5', '15368.00', '0.00', '0.00', '', '', '0000-00-00 00:00:00', 0, 0, '876'),
172 (
200, 'SA5', 'Swipe 60 GM', '', '', 47, '0.00', '80.00', 14203, 14156, '2010-05-11 00:00:00', 'admin', 'sales', 'SA5', '3760.00', '0.00', '0.00', '', '', '0000-00-00 00:00:00', 0, 0, '876');
173
174 -- --------------------------------------------------------
175
176 --
177 -- Table structure
for table `stock_sales`
178 --
179
180 CREATE TABLE `stock_sales` (
181   `id`
int(10) unsigned NOT NULL auto_increment,
182   `transactionid` varchar(
250) NOT NULL,
183   `stock_name` varchar(
200) NOT NULL,
184   `category` varchar(
120) NOT NULL,
185   `supplier_name` varchar(
200) NOT NULL,
186   `selling_price`
decimal(10,2) NOT NULL,
187   `quantity`
decimal(10,2) NOT NULL,
188   `amount`
decimal(10,2) NOT NULL,
189   `date` datetime NOT NULL,
190   `username` varchar(
120) NOT NULL,
191   `customer_id` varchar(
120) NOT NULL,
192   `subtotal`
decimal(10,2) NOT NULL,
193   `payment`
decimal(10,2) NOT NULL,
194   `balance`
decimal(10,2) NOT NULL,
195   `due` datetime NOT NULL,
196   `mode` varchar(
250) NOT NULL,
197   `description` varchar(
500) NOT NULL,
198   `count1`
int(11) NOT NULL,
199   `billnumber` varchar(
120) NOT NULL,
200   PRIMARY KEY (`id`)
201 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=
7 ;
202
203 --
204 -- Dumping data
for table `stock_sales`
205 --
206
207 INSERT INTO `stock_sales` (`id`, `transactionid`, `stock_name`, `category`, `supplier_name`, `selling_price`, `quantity`, `amount`, `date`, `username`, `customer_id`, `subtotal`, `payment`, `balance`, `due`, `mode`, `description`, `count1`, `billnumber`) VALUES
208 (
2, 'SA1', 'swipe 60 GM', '', '', '80.00', '114.00', '80.00', '2010-05-11 00:00:00', 'admin', 'customer1', '80.00', '1452.00', '7668.00', '2010-05-11 00:00:00', 'cash', 'dsfds', 1, '897897'),
209 (
3, 'SA3', 'swipe 60 GM', '', '', '80.00', '67.00', '80.00', '2010-05-11 00:00:00', 'admin', 'customer1', '65620.00', '69544.00', '0.00', '2010-05-11 00:00:00', 'cash', '', 1, '64564'),
210 (
4, 'SA3', 'newstock', '', '', '452.00', '145.00', '65540.00', '2010-05-11 00:00:00', 'admin', 'customer1', '65620.00', '69544.00', '0.00', '2010-05-11 00:00:00', 'cash', '', 2, '64564'),
211 (
5, 'SA5', 'newstock', '', '', '452.00', '34.00', '15368.00', '2010-05-11 00:00:00', 'admin', 'customer2', '19128.00', '14256.00', '4872.00', '2010-05-11 00:00:00', 'cash', 'lkh', 1, '876'),
212 (
6, 'SA5', 'Swipe 60 GM', '', '', '80.00', '47.00', '3760.00', '2010-05-11 00:00:00', 'admin', 'customer2', '19128.00', '14256.00', '4872.00', '2010-05-11 00:00:00', 'cash', 'lkh', 2, '876');
213
214 -- --------------------------------------------------------
215
216 --
217 -- Table structure
for table `stock_user`
218 --
219
220 CREATE TABLE `stock_user` (
221   `id`
int(10) unsigned NOT NULL auto_increment,
222   `username` varchar(
120) NOT NULL,
223   `password` varchar(
120) NOT NULL,
224   `user_type` varchar(
20) NOT NULL,
225   PRIMARY KEY (`id`)
226 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=
2 ;
227
228 --
229 -- Dumping data
for table `stock_user`
230 --
231
232 INSERT INTO `stock_user` (`id`, `username`, `password`, `user_type`) VALUES
233 (
1, 'admin', 'admin', 'admin');
234
235 -- --------------------------------------------------------
236
237 --
238 -- Table structure
for table `supplier_details`
239 --
240
241 CREATE TABLE `supplier_details` (
242   `id`
int(10) unsigned NOT NULL auto_increment,
243   `supplier_name` varchar(
200) NOT NULL,
244   `supplier_address` varchar(
500) NOT NULL,
245   `supplier_contact1` varchar(
100) NOT NULL,
246   `supplier_contact2` varchar(
100) NOT NULL,
247   `balance`
int(11) NOT NULL,
248   PRIMARY KEY (`id`)
249 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=
3 ;
250
251 --
252 -- Dumping data
for table `supplier_details`
253 --
254
255 INSERT INTO `supplier_details` (`id`, `supplier_name`, `supplier_address`, `supplier_contact1`, `supplier_contact2`, `balance`) VALUES
256 (
2, 'supplier1', 'ldsfl\r\ndsf\r\n\r\nds', '22324324', '09043590', 0);
257
258 -- --------------------------------------------------------
259
260 --
261 -- Table structure
for table `transactions`
262 --
263
264 CREATE TABLE `transactions` (
265   `id`
int(10) unsigned NOT NULL auto_increment,
266   `type` varchar(
50) NOT NULL,
267   `customer` varchar(
250) NOT NULL,
268   `supplier` varchar(
250) NOT NULL,
269   `subtotal`
decimal(10,2) NOT NULL,
270   `payment`
decimal(10,2) NOT NULL,
271   `balance`
decimal(10,2) NOT NULL,
272   `due` datetime NOT NULL,
273   `date` timestamp NOT NULL
default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
274   `rid` varchar(
120) NOT NULL,
275   PRIMARY KEY (`id`)
276 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=
9 ;
277
278 --
279 -- Dumping data
for table `transactions`
280 --
281
282 INSERT INTO `transactions` (`id`, `type`, `customer`, `supplier`, `subtotal`, `payment`, `balance`, `due`, `date`, `rid`) VALUES
283 (
1, 'entry', '', '12455', '0.00', '0.00', '0.00', '0000-00-00 00:00:00', '2010-03-11 09:31:26', 'SE123'),
284 (
2, 'entry', '', '12455', '0.00', '100.00', '900.00', '2010-03-10 00:00:00', '2010-03-11 09:39:19', 'SE125'),
285 (
3, 'entry', '', '12455', '0.00', '900.00', '0.00', '2010-03-10 00:00:00', '2010-03-11 09:39:28', 'SE125'),
286 (
4, 'entry', '', '12455', '6086.00', '1000.00', '86.00', '2010-03-10 00:00:00', '2010-03-11 09:42:00', 'SE132'),
287 (
5, 'sales', '', '', '57902.00', '50000.00', '5902.00', '2010-03-25 00:00:00', '2010-03-12 09:43:17', 'SA82'),
288 (
6, 'sales', '', '', '57902.00', '2000.00', '3902.00', '2010-03-25 00:00:00', '2010-03-12 09:43:23', 'SA82'),
289 (
7, 'sales', 'customer1', '', '5712.00', '2000.00', '1712.00', '2010-03-13 00:00:00', '2010-03-12 09:45:46', 'SA64'),
290 (
8, 'entry', '', '12455', '3060.00', '100.00', '960.00', '2010-03-11 00:00:00', '2010-03-21 13:16:46', 'SE155');
291
292 -- --------------------------------------------------------
293
294 --
295 -- Table structure
for table `uom_details`
296 --
297
298 CREATE TABLE `uom_details` (
299   `id`
int(10) unsigned zerofill NOT NULL auto_increment,
300   `name` varchar(
120) NOT NULL,
301   `spec` varchar(
120) NOT NULL,
302   PRIMARY KEY (`id`)
303 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=
10 ;
304
305 --
306 -- Dumping data
for table `uom_details`
307 --
308
309 INSERT INTO `uom_details` (`id`, `name`, `spec`) VALUES
310 (
0000000006, 'UOM1', 'UOM1 Specification'),
311 (
0000000007, 'UOM2', 'UOM2 Specification'),
312 (
0000000008, 'UOM3', 'UOM3 Specification'),
313 (
0000000009, 'UOM4', 'UOM4 Specification');


Gõ tìm kiếm nhanh...